package com.question.business.post.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.question.business.post.entity.Post;
import com.question.business.post.model.ao.PostDropDownAO;
import com.question.business.post.model.ao.PostPageAO;
import com.question.business.post.model.vo.PostDropDownVO;
import com.question.business.post.model.vo.PostVO;
import com.question.common.annotation.DataConvert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 岗位Mapper接口
 *
 * @author star
 * @since 2023-09-13
 */
@Mapper
public interface PostMapper extends BaseMapper<Post> {
    /**
     * 岗位分页查询
     *
     * @param page 分页参数
     * @param ao   请求参数
     * @return Page<PostVO> 响应参数
     */
    @DataConvert
    Page<PostVO> queryPostPage(Page<PostVO> page, @Param("ao") PostPageAO ao);

    /**
     * 岗位下拉列表查询
     *
     * @param ao 请求参数
     * @return List<PostDropDownVO> 响应参数
     */
    List<PostDropDownVO> queryPostDropDown(PostDropDownAO ao);
}